package Com.aop.demo;


import Com.aop.dao.UserDaoimpl;
import Com.aop.pojo.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationcontext.xml")
public class TextSpring_Jdbc {
    @Autowired
    private UserDaoimpl impl;
    @Test
    public  void fun(){
        User user = new User(0,"张三1","13245");
        int i = impl.save(user);
        System.out.println(i);

    }
    @Test
    public  void fun1(){
        User user = new User(0,"张三","1345");
        user = impl.queryUser(user);
        System.out.println(user);

    }
}
